package part2_q1_kitchen;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.ArrayList;

import common.CMultinomial;

/**
 *  optimal Multinomial : (false,0.1,25)
 */
public class TestClassifieurMultinomialKitchen {

	public static void main(String args[]){
		try {

			long start = System.currentTimeMillis(); 

			PrintWriter ecrivain;
			ecrivain =  new PrintWriter(new BufferedWriter(new FileWriter("Multinomial_training_test.csv")));

			ecrivain.println("MOTS_OUTILS_SUPPRIMES;SEUIL_FREQUENCE;EPSILON;NB_MOTS_DICO_FILTRE;TAUX_REUSSITE");

			ArrayList<File> fichiersApprentissage = new ArrayList<File>();
			fichiersApprentissage.add(new File("kitchen/training.txt"));
			
			CMultinomial mm = new CMultinomial
			(fichiersApprentissage, new File("kitchen/test.txt"),true,0.001,12.0, false);
			mm.executerCreationClasseur();

			mm.MAJFichierCSVInfluenceSeuilFrequenceEtEpsilon(ecrivain);

			ecrivain.close();

			long time= System.currentTimeMillis(); 
			System.out.println("Programme : " + (((time - start)/1000)) + "secondes");
		}
		catch (Exception e){
			e.printStackTrace();
		}
	}
}
